﻿using Android.Content;
using Android.Runtime;
using Android.Util;
using Android.Views;
using AndroidX.ViewPager.Widget;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace NightPlayer.views
{
    public class EinkViewPager : ViewPager
    {
        public EinkViewPager(Context context) : base(context)
        {
        }

        public EinkViewPager(Context context, IAttributeSet? attrs) : base(context, attrs)
        {
        }

        protected EinkViewPager(nint javaReference, JniHandleOwnership transfer) : base(javaReference, transfer)
        {
        }

        public override bool OnInterceptTouchEvent(MotionEvent? ev)
        {
            return false;
        }

        public override bool OnTouchEvent(MotionEvent? e)
        {
            return true;
        }

        public override int CurrentItem { get => base.CurrentItem; set => SetCurrentItem(value,false); }
        public override void SetCurrentItem(int item, bool smoothScroll)
        {
            base.SetCurrentItem(item, false);
        }
    }
}
